package com.hh.springboot.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@Table(name = "orderFrom")
public class OrderForm {
    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer id;
    @Column(name = "uId")
    private Integer uId;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JSONField(
            format = "yyyy-MM-dd HH:mm:ss"
    )
    @Column(name = "created")
    private Date created;
    @Column(name = "orders")
    private String orders;
    @Column(name = "sumPrice")
    private Double sumPrice;
    @Column(name = "stateId")
    private Integer stateId;
    @Column(name = "remark")
    private String remark;
}


